<?php
require "Db\DbHelper.php";
require "Tools\WebResult.php";

use Tools\WebResult;
use Db\DbHelper;

$db = DBHelper::createPDO();
$stmt = $db->prepare('select DISTINCT category from book');

$stmt->execute();

$row = $stmt->fetchall();

WebResult::JsonResult($row, "ok");